This application is based on application No. 2001-364754 filed in Japan, the contents of which are hereby incorporated by reference.
1. Field of the Invention
The present invention relates to an autofocusing apparatus for receiving an image signal and performing an imaging lens focusing control.
2. Description of the Background Art
Generally, an autofocusing control in a digital camera uses a method of detecting the contrast of an image from an image signal obtained by taking a picture of a subject and driving an imaging lens to a lens position in which the contrast value shows its peak, thereby bringing the image into focus.
This method is based on the principle such that the contrast of an image is low when an image of a main subject is blurred, the contrast gradually increases as the image of the main subject is coming into focus, and the contrast becomes the maximum when the focus is completely achieved on the image. Consequently, in the autofocusing control, a control mode is employed such that the contrast is detected in each lens position while driving the imaging lens at a predetermined pitch, the lens position in which the contrast is at its peak is specified as a focus position of the imaging lens, and the imaging lens (more strictly, a focusing lens) is moved to the focus position.
At the time of capturing an image by using a digital camera, however, if there is a camera movement, subject movement or the like, another subject may be instantaneously included in an image at a certain lens position. In such a case, the contrast falsely shows its peak in the lens position.
Therefore, even if the lens position where the contrast shows its peak is detected by a conventional autofocusing control, there is the possibility that the peak is a pseudo peak due to camera movement or the like and is not a peak at which the main subject is actually in focus. It causes a problem such that the main subject cannot be properly brought into focus.
Particularly, the magnification of zooming is becoming higher in an imaging lens of a digital camera in recent years, so that the problem is becoming bigger.
The present invention is directed to an autofocusing apparatus applied to a digital camera or the like.
According to the present invention, this autofocusing apparatus includes: an image generator for generating an image signal constructed by a plurality of pixels; a first detector for detecting a contrast value of an image from the image signal generated by the image generator; a second detector for detecting the number of edges of an image from the image signal generated by the image generator; and a controller for performing a focusing control of an imaging lens on the basis of the contrast value and the number of edges detected by the first and second detectors.
Therefore, the apparatus is constructed to detect a contrast value of an image from an image signal, detect the number of edges of the image from the image signal, and perform a control of focusing an imaging lens on the basis of the contrast value and the number of edges. Thus, an influence of a pseudo peak can be eliminated and focus can be appropriately achieved on a subject.
According to one aspect of the autofocusing apparatus, when the number of edges detected by the second detector is equal to or larger than a predetermined value, the controller determines that the imaging lens is positioned close to a focus position and, when it is determined that the imaging lens is positioned close to the focus position, the controller drives the imaging lens to a lens position in which the contrast value detected by the first detector indicates its maximum value.
Consequently, a peak which is not a pseudo peak of the contrast value can be detected. By driving the imaging lens to the lens position in which the peak is indicated, focus can be appropriately achieved on the subject.
According to another aspect of the autofocusing apparatus, the autofocusing apparatus further includes a calculator for calculating an edge width center of gravity value of an image from the image signal generated by the image generator, and when the number of edges detected by the second detector is equal to or larger than a predetermined value and the edge width center of gravity value calculated by the calculator is within a predetermined range, the controller determines that the imaging lens is positioned close to the focus position.
Consequently, a peak which is not a pseudo peak of the contrast value can be detected more accurately while being little affected by noise.
According to still another aspect of the autofocusing apparatus, when it is determined that the imaging lens is positioned close to the focus position, the controller drives the imaging lens in the direction that the contrast value detected by the first detector increases.
Consequently, the imaging lens can be driven to the direction in which the focus position can be specified efficiently, so that efficient focusing control can be realized.
According to yet another aspect of the autofocusing apparatus, when it is not determined that the imaging lens is positioned close to the focus position, the controller drives the imaging lens at higher speed as compared with the case where it is determined that the imaging lens is positioned close to the focus position.
Therefore, the imaging lens can be efficiently moved close to the focus position, and the focusing control can be carried out at higher speed.
According to yet another aspect of the autofocusing apparatus, when it is determined that the imaging lens is positioned close to the focus position, the controller drives the imaging lens on the basis of only the contrast value detected by the first detector.
Consequently, when it is determined that the imaging lens is positioned close to the focus position, the focus position of the imaging lens can be specified efficiently and accurately.
The present invention is also directed to a method of autofocusing an imaging lens.
As described above, the present invention has been achieved in consideration of the problems of the conventional techniques and its object is to realize an autofocusing technique capable of eliminating the influence of a pseudo peak and appropriately achieving focus on the subject.
These and other objects, features, aspects and advantages of the present invention will become more apparent from the following detailed description of the present invention when taken in conjunction with the accompanying drawings.